<script setup>
    import { getSearchAccountNum } from '@/api/govern'
    import { ElMessage } from 'element-plus'

    let showDetails = $ref(false)
    let manageNumber = $ref(null)

    const showAccoutDetails = (id, soucre) => {
        if(soucre == 'special'){
            getSearchAccountNum({ idCard: id }).then(res => {
                if(res.code == 200){
                    manageNumber = res.result
                    showDetails = true
                }else{
                    ElMessage.error('暂无数据~')
                }
            })
        }else {
            manageNumber = id
            showDetails = true
        }
    }

    defineExpose({
        showAccoutDetails
    })

</script>

<template>
    <el-dialog
        v-if="showDetails"
        v-model="showDetails"
        title="户况详情"
        width="1400px"
        @close="manageNumber=null"
    >   
        <div style="width: 100%; height: 800px">
            <iframe v-if="manageNumber" :src="'https://xz.tengcity.com/screen/#/familyInfo?id=' + manageNumber" width="100%" height="100%" frameborder="0"></iframe>
        </div>
    </el-dialog>
</template>